package com.ruoyi.depot.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 库存对象 tb_local_inventory
 * 
 * @author luxiaoyu
 * @date 2024-12-19
 */
public class LocalInventory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 库存记录唯一标识 */
    private String inventoryId;

    /** 产品SKU */
    @Excel(name = "产品SKU")
    private String sku;

    /** 产品id */
    @Excel(name = "产品id")
    private Long productId;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    private Long warehouseId;

    /** 实际总量 */
    @Excel(name = "实际总量")
    private BigDecimal actualQuantity;

    /** 可用量 (可销售库存) */
    @Excel(name = "可用量 (可销售库存)")
    private BigDecimal availableQuantity;

    /** 预留量/锁定量 */
    @Excel(name = "预留量/锁定量")
    private BigDecimal reservedQuantity;

    /** 次品量 */
    @Excel(name = "次品量")
    private BigDecimal defectiveQuantity;

    /** 待检量 */
    @Excel(name = "待检量")
    private BigDecimal inspectionQuantity;

    /** 待到货量 */
    @Excel(name = "待到货量")
    private BigDecimal arrivedQuantity;

    /** 0-30天的库存量 */
    @Excel(name = "0-30天的库存量")
    private BigDecimal stockAge30;

    /** 31-60天的库存量 */
    @Excel(name = "31-60天的库存量")
    private BigDecimal stockAge60;

    /** 61-90天的库存量 */
    @Excel(name = "61-90天的库存量")
    private BigDecimal stockAge90;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 记录最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 版本号 */
    @Excel(name = "版本号")
    private Integer version;

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getInventoryId() {
        return inventoryId;
    }

    public void setInventoryId(String inventoryId) {
        this.inventoryId = inventoryId;
    }

    public void setSku(String sku)
    {
        this.sku = sku;
    }

    public String getSku() 
    {
        return sku;
    }
    public void setWarehouseId(Long warehouseId) 
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId() 
    {
        return warehouseId;
    }
    public void setActualQuantity(BigDecimal actualQuantity) 
    {
        this.actualQuantity = actualQuantity;
    }

    public BigDecimal getActualQuantity() 
    {
        return actualQuantity;
    }
    public void setAvailableQuantity(BigDecimal availableQuantity) 
    {
        this.availableQuantity = availableQuantity;
    }

    public BigDecimal getAvailableQuantity() 
    {
        return availableQuantity;
    }
    public void setReservedQuantity(BigDecimal reservedQuantity) 
    {
        this.reservedQuantity = reservedQuantity;
    }

    public BigDecimal getReservedQuantity() 
    {
        return reservedQuantity;
    }
    public void setDefectiveQuantity(BigDecimal defectiveQuantity) 
    {
        this.defectiveQuantity = defectiveQuantity;
    }

    public BigDecimal getDefectiveQuantity() 
    {
        return defectiveQuantity;
    }
    public void setInspectionQuantity(BigDecimal inspectionQuantity) 
    {
        this.inspectionQuantity = inspectionQuantity;
    }

    public BigDecimal getInspectionQuantity() 
    {
        return inspectionQuantity;
    }
    public void setArrivedQuantity(BigDecimal arrivedQuantity) 
    {
        this.arrivedQuantity = arrivedQuantity;
    }

    public BigDecimal getArrivedQuantity() 
    {
        return arrivedQuantity;
    }
    public void setStockAge30(BigDecimal stockAge30) 
    {
        this.stockAge30 = stockAge30;
    }

    public BigDecimal getStockAge30() 
    {
        return stockAge30;
    }
    public void setStockAge60(BigDecimal stockAge60) 
    {
        this.stockAge60 = stockAge60;
    }

    public BigDecimal getStockAge60() 
    {
        return stockAge60;
    }
    public void setStockAge90(BigDecimal stockAge90) 
    {
        this.stockAge90 = stockAge90;
    }

    public BigDecimal getStockAge90() 
    {
        return stockAge90;
    }
    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("inventoryId", getInventoryId())
            .append("sku", getSku())
            .append("warehouseId", getWarehouseId())
            .append("actualQuantity", getActualQuantity())
            .append("availableQuantity", getAvailableQuantity())
            .append("reservedQuantity", getReservedQuantity())
            .append("defectiveQuantity", getDefectiveQuantity())
            .append("inspectionQuantity", getInspectionQuantity())
            .append("arrivedQuantity", getArrivedQuantity())
            .append("stockAge30", getStockAge30())
            .append("stockAge60", getStockAge60())
            .append("stockAge90", getStockAge90())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
